<template>
  <div class="dljjc_box3_x" style="min-height: 100vh">
    <m-tabs :value="val.tab" :data="val" @update:value="cfg.tabhand" :list="ct.tablist" />
    <template v-if="val.tab == 'ghz'">
      <component :is="ct.comp.ghz" />
    </template>
  </div>
</template>
<script>
import { cfg } from "@/cfg/cfg.js";
export default {
  setup() {
    const ct = {
      comp: {
        ghz: defineAsyncComponent(() => import(`./comp/team_ghz.vue`)),
      },
      deftab: "ghz",
      tablist: [
        { name: "ghz", title: "公会战作业" },
        { name: "dljjc", title: "地牢竞技场作业" },
        { name: "44jjc", title: "圆形作业" },
      ],
    };
    const val = reactive({});
    onMounted(async () => {
      nextTick(() => {
        if (cfg.route.query.tab == null) {
          cfg.router.replace({
            query: {
              ...cfg.route.query,
              tab: ct.deftab,
            },
          });
        }
      });
    });
    return { cfg, ct, val };
  },
};
</script>
